home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / AppMaker 2.0b3 / Demo AppMaker 1.5 / Demo AppMaker™ / Demo AppMaker™.rsrc / TmCT_105_ModalDialog < prev    next >
Encoding:
Text File  |  1992-04-08  |  2.0 KB  |  92 lines

  1. /* %filename% -- Modal dialog */
  2. /* Created %date% %time% by AppMaker */
  3.  
  4. /*    This module overrides the AppMaker-generated code in z%dlogname%.%        %*/
  5. /*    It provides a place for you to add your own code and still be able to    */
  6. /*    generate code for new changes to the user interface.  This module will    */
  7. /*    not be regenerated by AppMaker unless you delete it.  Its superclass,    */
  8. /*    z%dlogname%, may be regenerated to handle user interface changes%        %*/
  9. /*    without losing your hand-coded changes to this module.                    */
  10.  
  11. #include <Commands.h>
  12. #include <Global.h>
  13. #include <CBartender.h>
  14. #include <CDirectorOwner.h>
  15. #include <TBUtilities.h>
  16. #include "ResourceDefs.h"
  17. %for each item gen include%
  18. #include "%dlogname%.h"
  19.  
  20. extern    CBartender        *gBartender;    /* The menu handling object */
  21.  
  22. %for each item gen defineItem%
  23.  
  24. /*----------*/
  25. void    Do%dlogname%    (CDirectorOwner        *aSupervisor)
  26. {
  27.     C%dlogname%%    %*dialog;
  28.     long            dismisser;
  29.  
  30.     dialog = NULL;
  31.     TRY {
  32.         dialog = new C%dlogname%;
  33.         dialog->I%dlogname% (aSupervisor);
  34.     
  35.         /* initialize dialog panes */
  36.     
  37.         dialog->BeginDialog ();
  38.         dismisser = dialog->DoModalDialog (cmdOK);    
  39.     
  40.         if (dismisser == cmdOK) {
  41.             /* extract values from dialog panes */
  42.         }
  43.     
  44.         dialog->Dispose ();
  45.     } CATCH {
  46.         ForgetObject (dialog);
  47.     } ENDTRY;
  48.  
  49. } /* Do%dlogname% */
  50.  
  51. /*----------*/
  52. void    C%dlogname%::I%dlogname%    (CDirectorOwner        *aSupervisor)
  53. {
  54.     inherited::IZ%dlogname% (aSupervisor);
  55.  
  56.     // any additional initialization for your dialog
  57.  
  58. } /* I%dlogname% */
  59.  
  60. %for each item gen auxiliaryMethod%
  61. /*----------*/
  62. void    C%dlogname%::UpdateMenus    (void)
  63. {
  64.     inherited::UpdateMenus ();
  65.  
  66. } /* UpdateMenus */
  67.  
  68. /*----------*/
  69. void    C%dlogname%::DoCommand        (long        theCommand)
  70. {
  71.     switch (theCommand) {
  72.         %for each item gen DoCommand%
  73.  
  74.         default:
  75.                 inherited::DoCommand (theCommand);
  76.             break;
  77.     } /* switch */
  78.  
  79. } /* DoCommand */
  80.     
  81. /*----------*/
  82. void    C%dlogname%::ProviderChanged%    %(CCollaborator    *aProvider,
  83.                                          long            reason,
  84.                                          void*            info)
  85.  
  86. {
  87.     %for each item gen ProviderChanged%
  88.  
  89. } /* ProviderChanged */
  90.  
  91. /* %dlogname% */
  92.